<template>
    <el-sub-menu :index="index" class="submenuclass">
      <!-- {{data.children}} -->
        <template #title>
          <i :class="data.data.icon" v-if="data.data.icon"></i>
          <span >{{data.data.name}}</span>
        </template>
        <el-menu-item-group>
          <template v-for="(item,ind) in data.children" :key="item.data.id">
              <MenuItem :index="index + '-' + ind" :data="item"></MenuItem>
          </template>
        </el-menu-item-group>
      </el-sub-menu>
</template>

<script lang="ts">

import Vue from 'vue'
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'MenuGroup',
  components: {    
  },

  props:{
    data:Object,
    index:String
  }

})
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
